package com.wisezone.frame.web;

import java.util.List;

import com.wisezone.common.annotation.WzWebAnnotation;
import com.wisezone.common.exception.WzWebException;
import com.wisezone.common.web.BaseController;
import com.wisezone.permission.bean.form.WzMenuForm;
import com.wisezone.permission.service.WzMenuService;

@SuppressWarnings("unchecked")
@WzWebAnnotation(moduleName="frame")
public class FrameController extends BaseController {

	private WzMenuService wzMenuService;

	/**
	 * 进入首页
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public String index() throws WzWebException {

		return "index";
	}

	/**
	 * 进入顶部页
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public String top() throws WzWebException {

		return "top";
	}

	/**
	 * 进入菜单页
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public String left() throws WzWebException {

		// 获得菜单列表
		List<WzMenuForm> menuList = wzMenuService.getMenuList(null);
		model.put("menuList", menuList);
		return "left";
	}

	/**
	 * 进入菜单按钮
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public String btnLeft() throws WzWebException {

		return "btnLeft";
	}

	/**
	 * 进入顶部按钮
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public String btnTop() throws WzWebException {

		return "btnTop";
	}

	/**
	 * 进入桌面页
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public String main() throws WzWebException {
		return "main";
	}

	public void setWzMenuService(WzMenuService wzMenuService) {
		this.wzMenuService = wzMenuService;
	}
	
	


}
